/**
 * @file
 * @auth jinguangguo
 * @date 20117/1/23
 */

import Vue from 'vue';
import VueI18n from 'vue-i18n';
import moment from 'moment';

import './base/init';
import LangPopover from '../component/LangPopover.vue';
import SmcFinance from '../module/smcFund/smcFinance/main';
import SmcProfit from '../module/smcFund/smcProfit/main';
import messages from '../module/smcFund/lang';

Vue.use(VueI18n);

let i18n =  new VueI18n({
    locale: window.app.LANG,
    messages, // set locale messages
});

Vue.prototype.$$moment = moment;

const router = new VueRouter({
    'routes': [
        {
            path: '/',
            name: 'index',
            component: SmcFinance
        },
        {
            path: '/profit',
            name: 'profit',
            component: SmcProfit
        }
    ]
});

const app = new Vue({
    i18n,
    router,
    components: {
        LangPopover,
        SmcFinance,
    }
}).$mount('#app');
